package com.study_platform.service.impl;

import com.study_platform.consumer.WebSocketServer;
import com.study_platform.entity.Pk;
import com.study_platform.mapper.PkMapper;
import com.study_platform.service.PkService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import io.swagger.models.auth.In;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author auto
 * @since 2023-04-11
 */
@Service
@Transactional
public class PkServiceImpl extends ServiceImpl<PkMapper, Pk> implements PkService {

    @Override
    public String startGame(Integer aId, Integer bId, Integer grade, String point) {
        WebSocketServer.startGame(aId, bId, grade, point);
        return "successfully open the game!";
    }
}
